package com.web.music.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

@Entity
public class Album implements PersistentObject {
	
	@Id
	private Long id;
	
	private String title;
	
	private String review;	
	
	@ManyToOne
	private Artist artist = null;
	
	@ManyToMany
	private List<Genre> genres = new ArrayList<Genre>();
	
	@OneToMany
	private List<Track> tracks = new ArrayList<Track>();


	public String getTitle(){
		return title;
	}

	public String getReview(){
		return review;
	}

	public void setReview(String review ){
		this.review = review;
	}

	public void setTitle(String title ){
		this.title = title;
	}

	public List<Genre> getGenres() {
		return genres;
	}

	public void setGenres(List<Genre> genres) {
		this.genres = genres;
	}

	public Artist getArtist() {
		return artist;
	}

	public void setArtist(Artist artist) {
		this.artist = artist;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setTracks(List<Track> tracks) {
		this.tracks = tracks;
	}

	public List<Track> getTracks() {
		return tracks;
	}

}
